<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>首页</title>
    <script type="text/javascript" src="/JS/Jquery/Jquery-2.2.1.js"></script>
    <script>
        $(function () {
            debugger
            var pdfUrl = "";
            /*$.ajax({
                type: "POST",
                cache: false,  //禁用浏览器缓存
                async: false,
                url:"/file/readFileToByte",
                success: function(re) {
                    pdfUrl = re.result;
                }
            });*/
            pdfUrl = "/pdf/readFileToBase64"
            var url = "/pdfjs/web/viewer.html?file="+ encodeURIComponent(pdfUrl);
            $("#pdfiframe").attr("src", url);
        })
    </script>
    <style type="text/css">
        html, body {
            margin: 0;
            padding: 0;
            height: 100%;
            width: 100%;
        }

        .bigDiv {
            display: flex;
            justify-content: flex-start;
            height: 100%;
            width: 100%;
            background-color: rgba(211, 211, 211, 0.2);
        }

        .leftDiv {
            width: 20rem;
            border-right: solid 1px;
        }

        .rightDiv {
            flex: 1;
        }
    </style>
</head>
<body>
<div class="bigDiv">
    <div class="leftDiv"></div>
    <div class="rightDiv">
        <iframe id="pdfiframe" src="" width="100%" height="100%"></iframe>
    </div>
</div>


</body>
</html>